package com.zhongpengcheng.blog.properties;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * 阿里云OSS配置
 * note: 1.记录变更 by zhongpengcheng
 *
 * @author zhongpengcheng
 * @date 2021/09/02 14:54
 **/
@Getter
@Setter
@PropertySource(value = "classpath:oss/oss.properties", ignoreResourceNotFound = true)
@ConfigurationProperties(prefix = "oss")
@Component
public class OssProperties {
    /**
     * 访问域名
     */
    private String endpoint;
    /**
     * 访问Key的Id
     */
    private String accessKeyId;
    /**
     * 访问Key的密钥
     */
    @JSONField(serialize = false)
    private String accessKeySecret;
    /**
     * oss桶的名称
     */
    private String bucket;
    /**
     * 外链访问路径前缀
     */
    private String urlPrefix;
    /**
     * 默认储存路径
     */
    private String defaultDir = "default/";
    /**
     * 图片储存路径
     */
    private String imageDir = "image/";
    /**
     * markdown储存路径
     */
    private String markdownDir = "markdown/";
    /**
     * skel文件储存路径
     */
    private String skelDir = "spine/skeleton/";
    /**
     * atlas文件储存路径
     */
    private String atlasDir = "spine/atlas/";
    /**
     * texture文件储存路径
     */
    private String textureDir = "spine/texture/";
}
